import * as vue from "vue";
import { createApp } from "vue";
import App from "./App.vue";
import { router } from "@/router";
import store from "@/store";
import Antd from "ant-design-vue";
// css
import "ant-design-vue/dist/antd.less";
import "@/styles/index.less";

async function bootstrap() {
  const app = createApp(App);
  // 全局异常处理
  app.config.errorHandler = (
    err: unknown,
    instance: vue.ComponentPublicInstance<any>,
    info: string
  ) => {
    console.error(err, instance, info);
  };

  app.use(Antd);
  app.use(store);
  app.use(router);
  app.mount("#app");
}

bootstrap();
